<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1">
  <title>ALTER RULE</title>
  <body>
    <p id="sql_command_desc">Changes the definition of a rule.</p>
    <section id="section2">
      <title>Synopsis</title>
      <codeblock id="sql_command_synopsis">ALTER RULE <varname>name</varname> ON <varname>table_name</varname> RENAME TO <varname>new_name</varname></codeblock>
    </section>
    <section id="section3">
      <title>Description</title>
      <p><codeph>ALTER RULE</codeph> changes properties of an existing rule. Currently, the only
        available action is to change the rule's name. </p>
      <p>To use <codeph>ALTER RULE</codeph>, you must own the table or view that the rule applies
        to. </p>
    </section>
    <section id="section4">
      <title>Parameters</title>
      <parml>
        <plentry>
          <pt><varname>name</varname></pt>
          <pd>The name of an existing rule to alter. </pd>
        </plentry>
        <plentry>
          <pt><varname>table_name</varname></pt>
          <pd>The name (optionally schema-qualified) of the table or view that the
            rule applies to.
          </pd>
        </plentry>
        <plentry>
          <pt><varname>new_name</varname></pt>
          <pd> The new name for the rule.</pd>
        </plentry>
      </parml>
    </section>
    <section id="section7">
      <title>Compatibility</title>
      <p><codeph>ALTER RULE</codeph> is a Greenplum Database language extension, as is the entire
        query rewrite system. </p>
    </section>
    <section>
      <title>See Also</title>
      <p><codeph><xref href="CREATE_RULE.xml#topic1"/></codeph>, <codeph><xref
            href="DROP_RULE.xml#topic1"/></codeph>
      </p>
    </section>
  </body>
</topic>
